06 / 12

How do you make media fallback for unsupported browsers?

Making Media Fallback Work in HTML

In HTML, when embedding media with <video> or <audio>, you can provide fallback content that appears if the browser does not support the element or the provided file formats.

Ways to Provide Fallback
  1. 1

    Use multiple <source> elements to supply different formats (e.g., MP4, WebM, Ogg for video; MP3, OGG, WAV for audio).

  2. 2

    Add text inside the <video> or <audio> tags — this text is displayed when the media cannot be played.

  3. 3

    Include a download link so users can access the file even if playback fails.

  4. 4

    For very old browsers, you can embed a Flash player or external plugin as an extra fallback (rarely needed today).

Example Usage

In short: Always include multiple formats using <source> and add fallback text or links so users can still access your media if their browser doesn’t support direct playback.